<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ConnectionDelegate Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
	<meta name="viewport" content="width=device-width, viewport-fit=cover, initial-scale=1.0" />
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Protocol/ConnectionDelegate" class="dashAnchor"></a>
    <a title="ConnectionDelegate Protocol Reference"></a>
    <header>
      <div class="content-wrapper">
        <p>
          <a href="../index.html">PostgresClientKit Docs</a>
          <span class="no-mobile"> (100% documented)</span>
        </p>
    
        <p class="header-right">
          <a href="https://github.com/codewinsdotcom/PostgresClientKit">
            <img src="../img/gh.png"/>
            <span class="no-mobile">View on GitHub</span>
          </a>
        </p>
    
      </div>
    </header>
    <div id="breadcrumbs-container">
      <div class="content-wrapper">
        <p id="breadcrumbs">
          <span class="no-mobile">
            <a href="../index.html">PostgresClientKit Reference</a>
            <img id="carat" src="../img/carat.png" />
          </span>
          ConnectionDelegate Protocol Reference
        </p>
      </div>
    </div>
    <div class="wrapper">
      <div class="article-wrapper">
        <article class="main-content">
          <section>
            <section class="section">
              <h1>ConnectionDelegate</h1>
                <div class="declaration">
                  <div class="language">
                    <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">ConnectionDelegate</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>

                  </div>
                </div>
              <p>A delegate for <code><a href="../Classes/Connection.html">Connection</a></code> instances.</p>

            </section>
            <section class="section task-group-section">
              <div class="task-group">
                <ul>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:17PostgresClientKit18ConnectionDelegateP10connection_16didReceiveNoticeyAA0D0C_AA0I0VtF"></a>
                      <a name="//apple_ref/swift/Method/connection(_:didReceiveNotice:)" class="dashAnchor"></a>
                      <a class="token" href="#/s:17PostgresClientKit18ConnectionDelegateP10connection_16didReceiveNoticeyAA0D0C_AA0I0VtF">connection(_:didReceiveNotice:)</a>
                      </code>
                        <span class="declaration-note">
                          Default implementation
                        </span>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>Called upon receiving a notice message from the Postgres server.</p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    <p><a href="https://www.postgresql.org/docs/12/protocol-flow.html#PROTOCOL-ASYNC">Postgres: Message Flow - Asynchronous
Opererations</a></p>

</div>

                        </div>
                        <h4>Default Implementation</h4>
                        <div class="default_impl abstract">
                          <p>Does nothing.</p>

                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">connection</span><span class="p">(</span><span class="n">_</span> <span class="nv">connection</span><span class="p">:</span> <span class="kt"><a href="../Classes/Connection.html">Connection</a></span><span class="p">,</span>
                <span class="n">didReceiveNotice</span> <span class="nv">notice</span><span class="p">:</span> <span class="kt"><a href="../Structs/Notice.html">Notice</a></span><span class="p">)</span></code></pre>

                          </div>
                        </div>
                        <div>
                          <h4>Parameters</h4>
                          <table class="graybox">
                            <tbody>
                              <tr>
                                <td>
                                  <code>
                                  <em>connection</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the <code><a href="../Classes/Connection.html">Connection</a></code></p>
                                  </div>
                                </td>
                              </tr>
                              <tr>
                                <td>
                                  <code>
                                  <em>notice</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the notice message</p>
                                  </div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                      </section>
                    </div>
                  </li>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:17PostgresClientKit18ConnectionDelegateP10connection_25didReceiveParameterStatusyAA0D0C_SS4name_SS5valuettF"></a>
                      <a name="//apple_ref/swift/Method/connection(_:didReceiveParameterStatus:)" class="dashAnchor"></a>
                      <a class="token" href="#/s:17PostgresClientKit18ConnectionDelegateP10connection_25didReceiveParameterStatusyAA0D0C_SS4name_SS5valuettF">connection(_:didReceiveParameterStatus:)</a>
                      </code>
                        <span class="declaration-note">
                          Default implementation
                        </span>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>Called upon a change in the value of certain Postgres server parameters.</p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    <p><a href="https://www.postgresql.org/docs/12/protocol-flow.html#PROTOCOL-ASYNC">Postgres: Message Flow - Asynchronous
Opererations</a></p>

</div>

                        </div>
                        <h4>Default Implementation</h4>
                        <div class="default_impl abstract">
                          <p>Does nothing.</p>

                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">connection</span><span class="p">(</span><span class="n">_</span> <span class="nv">connection</span><span class="p">:</span> <span class="kt"><a href="../Classes/Connection.html">Connection</a></span><span class="p">,</span>
                <span class="n">didReceiveParameterStatus</span> <span class="nv">parameterStatus</span><span class="p">:</span> <span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">String</span><span class="p">))</span></code></pre>

                          </div>
                        </div>
                        <div>
                          <h4>Parameters</h4>
                          <table class="graybox">
                            <tbody>
                              <tr>
                                <td>
                                  <code>
                                  <em>connection</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the <code><a href="../Classes/Connection.html">Connection</a></code></p>
                                  </div>
                                </td>
                              </tr>
                              <tr>
                                <td>
                                  <code>
                                  <em>parameterStatus</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the parameter name and new value</p>
                                  </div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                      </section>
                    </div>
                  </li>
                  <li class="item">
                    <div>
                      <code>
                      <a name="/s:17PostgresClientKit18ConnectionDelegateP10connection_22didReceiveNotificationyAA0D0C_s6UInt32V9processId_SS7channelSS7payloadttF"></a>
                      <a name="//apple_ref/swift/Method/connection(_:didReceiveNotification:)" class="dashAnchor"></a>
                      <a class="token" href="#/s:17PostgresClientKit18ConnectionDelegateP10connection_22didReceiveNotificationyAA0D0C_s6UInt32V9processId_SS7channelSS7payloadttF">connection(_:didReceiveNotification:)</a>
                      </code>
                        <span class="declaration-note">
                          Default implementation
                        </span>
                    </div>
                    <div class="height-container">
                      <div class="pointer-container"></div>
                      <section class="section">
                        <div class="pointer"></div>
                        <div class="abstract">
                          <p>Called upon receiving a notification message from the Postgres server.</p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    <p><a href="https://www.postgresql.org/docs/12/sql-notify.html">Postgres: NOTIFY command</a></p>

</div>

                        </div>
                        <h4>Default Implementation</h4>
                        <div class="default_impl abstract">
                          <p>Does nothing.</p>

                        </div>
                        <div class="declaration">
                          <h4>Declaration</h4>
                          <div class="language">
                            <p class="aside-title">Swift</p>
                            <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">connection</span><span class="p">(</span>
    <span class="n">_</span> <span class="nv">connection</span><span class="p">:</span> <span class="kt"><a href="../Classes/Connection.html">Connection</a></span><span class="p">,</span>
    <span class="n">didReceiveNotification</span> <span class="nv">notification</span><span class="p">:</span> <span class="p">(</span><span class="nv">processId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">channel</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">payload</span><span class="p">:</span> <span class="kt">String</span><span class="p">))</span></code></pre>

                          </div>
                        </div>
                        <div>
                          <h4>Parameters</h4>
                          <table class="graybox">
                            <tbody>
                              <tr>
                                <td>
                                  <code>
                                  <em>connection</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the <code><a href="../Classes/Connection.html">Connection</a></code></p>
                                  </div>
                                </td>
                              </tr>
                              <tr>
                                <td>
                                  <code>
                                  <em>notice</em>
                                  </code>
                                </td>
                                <td>
                                  <div>
                                    <p>the server process ID, channel, and payload of the notification</p>
                                  </div>
                                </td>
                              </tr>
                            </tbody>
                          </table>
                        </div>
                      </section>
                    </div>
                  </li>
                </ul>
              </div>
            </section>
          </section>
        </article>
      </div>
      <div class="nav-wrapper">
        <nav class="nav-bottom">
          <ul class="nav-groups">
            <li class="nav-group-name">
              <a href="../Classes.html">Classes</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="../Classes/Connection.html">Connection</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Classes/ConnectionPool.html">ConnectionPool</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Classes/ConsoleLogHandler.html">ConsoleLogHandler</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Classes/Cursor.html">Cursor</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Classes/Logger.html">Logger</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Classes/Statement.html">Statement</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="../Enums.html">Enumerations</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="../Enums/Credential.html">Credential</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Enums/LogLevel.html">LogLevel</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Enums/PostgresError.html">PostgresError</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="../Extensions.html">Extensions</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="../Extensions/Bool.html">Bool</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/Date.html">Date</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/Decimal.html">Decimal</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/Double.html">Double</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/Int.html">Int</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/Optional.html">Optional</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Extensions/String.html">String</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="../Protocols.html">Protocols</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="../Protocols/ConnectionDelegate.html">ConnectionDelegate</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Protocols/LogHandler.html">LogHandler</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Protocols/PostgresValueConvertible.html">PostgresValueConvertible</a>
                </li>
              </ul>
            </li>
            <li class="nav-group-name">
              <a href="../Structs.html">Structures</a>
              <ul class="nav-group-tasks">
                <li class="nav-group-task">
                  <a href="../Structs/ColumnMetadata.html">ColumnMetadata</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/ConnectionConfiguration.html">ConnectionConfiguration</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/ConnectionPoolConfiguration.html">ConnectionPoolConfiguration</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/ConnectionPoolMetrics.html">ConnectionPoolMetrics</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/LogRecord.html">LogRecord</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/Notice.html">Notice</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/Postgres.html">Postgres</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresByteA.html">PostgresByteA</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresDate.html">PostgresDate</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresTime.html">PostgresTime</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresTimeWithTimeZone.html">PostgresTimeWithTimeZone</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresTimestamp.html">PostgresTimestamp</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresTimestampWithTimeZone.html">PostgresTimestampWithTimeZone</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/PostgresValue.html">PostgresValue</a>
                </li>
                <li class="nav-group-task">
                  <a href="../Structs/Row.html">Row</a>
                </li>
              </ul>
            </li>
          </ul>
        </nav>
      </div>
      <div class="footer-wrapper">
        <section id="footer">
          <p>Copyright 2019 David Pitfield and the PostgresClientKit contributors. Licensed under the Apache License, Version 2.0.</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </div>
    </div>
  </body>
</div>
</html>
